package com.meida.module.product.provider.controller;

import com.meida.common.mybatis.model.*;
import io.swagger.annotations.Api;
import org.springframework.web.bind.annotation.RequestMapping;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.*;


import org.springframework.web.bind.annotation.RestController;
import com.meida.common.springmvc.base.BaseController;
import com.meida.module.product.client.entity.ProdProductdetails;
import com.meida.module.product.provider.service.ProdProductdetailsService;
import springfox.documentation.annotations.ApiIgnore;


/**
 * 产品详细表控制器
 *
 * @author flyme
 * @date 2019-07-03
 */
@RestController
@RequestMapping("/productdetails/")
@Api(tags = "商品服务-Product")
@ApiIgnore
public class ProdProductdetailsController extends BaseController<ProdProductdetailsService, ProdProductdetails> {

    @ApiOperation(value = "产品详细表-分页列表", notes = "产品详细表分页列表 ")
    @GetMapping(value = "pageList")
    public ResultBody pageList(@ModelAttribute(value = "pageModel") PageModel pageModel) {

        return bizService.pageList(pageModel);
    }

    @ApiOperation(value = "产品详细表-列表", notes = "产品详细表列表 ")
    @GetMapping(value = "list}")
    public ResultBody list(@ModelAttribute(value = "model") ListModel model) {
        return bizService.listEntityMap(model);
    }

    @ApiOperation(value = "产品详细表-添加", notes = "添加产品详细表")
    @PostMapping(value = "add")
    public ResultBody add(SaveModel model) {
        return bizService.add(model);
    }

    @ApiOperation(value = "产品详细表-更新", notes = "更新产品详细表")
    @PostMapping(value = "update")
    public ResultBody update(UpdateModel model) {

        return bizService.edit(model);
    }

    @ApiOperation(value = "产品详细表-删除", notes = "删除产品详细表")
    @PostMapping(value = "remove")
    public ResultBody remove(DeleteModel model) {
        return bizService.delete(model);
    }


    @ApiOperation(value = "产品详细表-详情", notes = "产品详细表详情")
    @GetMapping(value = "get")
    public ResultBody get(@ModelAttribute(value = "model") GetModel model) {
        return bizService.get(model);
    }
}
